using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities.Editor;

public class OdinEditor : OdinEditorWindow
{
    [MenuItem("Tools/OdinEditor")]
    public static void Open()
    {
        GetWindow<OdinEditor>().Show();
    }
    

    protected override void OnBeginDrawEditors()
    {
        base.OnBeginDrawEditors();
        SirenixEditorGUI.BeginVerticalList();
        SirenixEditorGUI.SearchField(new Rect(0, 0, 200, 30), "");
        SirenixEditorFields.Dropdown(0, new string[] { "A", "B", "C", "D" });
        SirenixEditorGUI.EndVerticalList();
    }

    [Button("打开面板")]
    public void OpenInspector()
    {
        InspectObject(AssetDatabase.LoadAssetAtPath<Texture2D>("Assets/GameRes/Textures/guozi_1.png"));
        //OdinEditorWindow.InspectObject(AssetDatabase.LoadAssetAtPath<GameObject>("Assets/GameRes/Prefabs/PathPoint.prefab"));
    }
}
